<template>
    <div>
    <h3>后台商品库存</h3>
      <div style="display: flex;margin-left: 500px" >
        <el-button @click="BuyPlan">采购计划管理</el-button>
        <el-button @click="ProviderOrder">供货单管理</el-button>
        <el-button @click="GoodsInDetail">入库明细</el-button>
        <el-button @click="GoodsOutDetail">出库明细</el-button>
      </div>

        <el-table
                :data="tableData"
                stripe
                style="width: 100%">
            <el-table-column
                    prop="date"
                    label="日期">
            </el-table-column>
            <el-table-column
                    prop="name"
                    label="姓名">
            </el-table-column>
            <el-table-column
                    prop="address"
                    label="地址">
            </el-table-column>

            <el-table-column
                    fixed="right"
                    label="操作">
                <template slot-scope="scope">
                    <el-button @click="choice(scope.row)" type="text" size="small">设置阈值</el-button>
                </template>
            </el-table-column>
        </el-table>

    </div>
</template>

<script>
    export default {
        name: "GoodsView",

        data() {
            return {
                tableData: [{
                    date: '2016-05-02',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1517 弄'
                }, {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1519 弄'
                }, {
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1516 弄'
                }]
            }
        },

        methods:{
          BuyPlan(){
            this.$router.push("BuyPlan")
            },

          ProviderOrder(){
            this.$router.push("ProviderOrder")
            },
          GoodsInDetail(){
            this.$router.push("GoodsInDetail")
            },
          GoodsOutDetail(){
            this.$router.push("GoodsOutDetail")
            }

        }

    }
</script>

<style scoped>

</style>